package com.yzyz.web.controller.visitor.news;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.yzyz.bean.news.NewsBean;
import com.yzyz.data.CacheFactory;

/**
 * 查看新闻
 * @author David Sun
 * @Date   2010-4-23
 *
 */
public class NewsController extends AbstractController {
	
	public ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response){
		NewsBean news = CacheFactory.getNewsStore().get(Integer.valueOf(request.getParameter("newsId")));
		ModelAndView mv = new ModelAndView("/News/viewNews.jsp");
		mv.addObject("news", news);
		return mv;
	}
}
